<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Introduction to PyGTK</title>
<link rel="stylesheet" href="/cfg/format.css" type="text/css">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="keywords" content="GUI, Introduction to PyGTK, PyGTK library, PyGTK, Linux, programming">
<meta name="description" content="Introduction to PyGTK">
<meta name="language" content="en">
<meta name="author" content="Jan Bodnar">
<meta name="distribution" content="global">

<script type="text/javascript" src="/lib/jquery.js"></script>
<script type="text/javascript" src="/lib/common.js"></script>

</head>

<body>

<div class="container">

<div id="wide_ad" class="ltow">
<script type="text/javascript"><!--
google_ad_client = "pub-9706709751191532";
/* 160x600, August 2011 */
google_ad_slot = "2484182563";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div> 

<div class="content">


<a href="/" title="Home">Home</a>&nbsp;
<a href="..">Contents</a>


<h1>Introduction to PyGTK</h1>

<p>
In this part of the PyGTK programming tutorial, we will talk 
about the PyGTK GUI library and Python programming language in general. 
</p>

<script type="text/javascript"><!--
google_ad_client = "pub-9706709751191532";
/* NewSquare */
google_ad_slot = "0364418177";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script> 
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
</script>


<h2>About this tutorial</h2>

<p>
This is PyGTK programming tutorial. 
It has been created and tested on Linux. The PyGTK programming tutorial 
is suited for novice and more advanced programmers. 
</p>

<h2>PyGTK</h2>

<p>
PyGTK is a set of Python wrappers for the GTK+ GUI library. 
It offers a comprehensive set of graphical elements 
and other useful programming facilities for creating desktop
applications. It is a part of the GNOME project. 
PyGTK is free software and licensed under the LGPL.
Original autor or PyGTK is <b>James Henstridge</b>.
PyGTK is very easy to use, it is ideal for rapid
prototyping. Currently, PyGTK is one of the most
popular bindings for the GTK+ library.
</p>

<p>
PyGTK consists of several modules. 
</p>

<br>
<img src="/img/gui/pygtk/modules.png" alt="PyGTK modules">


<p>
<b class="keyword">GObject</b> is a base class providing the common attributes and
functions for PyGTK classes. 
<b class="keyword">ATK</b> is the accessibility toolkit. This toolkit provides
tools which help physically challenged people work with computers.
<b class="keyword">GTK</b> is the user interface module. 
The <b class="keyword">Pango</b> is a library which is used to work with text and internationalization.
<b class="keyword">Cairo</b> is a library for creating 2D vector graphics.
<b class="keyword">Glade</b> is used to build GUI interfaces from XML descriptions.
</p>



<h2>Python</h2>

<p>
<img src="/img/gui/pygtk/pythonlogo.png" style="float: left;" alt="python logo">
Python is a general-purpose, dynamic, object-oriented programming language.  
The design purpose of the Python language emphasizes programmer productivity 
and code readability. Python was initially developed by <b>Guido van Rossum</b>. 
It was first released in 1991. Python was inspired by ABC, Haskell, Java, Lisp, Icon
and Perl  programming languages. Python is a high level, general purpose, 
multiplatform, interpreted language.  
Python is a minimalistic language. One of it's most visible features is that it does 
not use semicolons nor brackets. Python uses indentation instead. 
There are two main branches of Python currently. Python 2.x and Python 3.x. Python 3.x
breaks backward compatibility with previous releases of Python. It was created to
correct some design flaws of the language and make the language more clean. 
The most recent version of Python 2.x is 2.7.1, and of Python 3.x 3.1.3.
This tutorial is writtein in Python 2.x Today, Python is maintained by a large 
group of volunteers worldwide. 
</p>


<h2>GTK+</h2>

<p>
<img src="/img/gui/pygtk/gtk.png" style="float: left; margin-right:10px"> 
The <b class="keyword">GTK+</b> is a library for creating graphical user 
interfaces. The library is created in C programming language. The GTK+ library 
is also called the GIMP Toolkit. Originally, the library was created
while developing the GIMP image manipulation program. Since then, the GTK+ 
became one of the most popular toolkits under Linux and BSD Unix. Today, 
most of the GUI software in the open source world is created in Qt or in GTK+.
The GTK+ is an object oriented application programming interface. The object 
oriented system is created with the Glib object system, which is a base for 
the GTK+ library. The <b class="keyword">GObject</b> also enables to 
create language bindings for various other programming languages. 
Language bindings exist for C++, Python, Perl, Java, C# and other programming languages. 
</p>

<p>
Gnome and XFce desktop environments have been created using the 
GTK+ library. SWT and wxWidgets are well known programming frameworks, 
that use GTK+. Prominent software applications that use GTK+ include Firefox or Inkscape.
</p>


<h2>Sources</h2>

<ul>
<li><a href="http://www.pygtk.org">pygtk.org</a></li>
<li><a href="http://wwww.wikipedia.org">wikipedia.org</a></li>
</ul>

<hr class="btm">

<br>
<div class="center"> 
<script type="text/javascript"><!--
google_ad_client = "pub-9706709751191532";
/* horizontal */
google_ad_slot = "1734478269";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script> 
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> 
</script> 
</div> 
<br>


<div class="botNav, center">
<span class="botNavItem"><a href="/">Home</a></span> ‡ <span class="botNavItem"><a href="..">Contents</a></span> ‡
<span class="botNavItem"><a href="#">Top of Page</a></span>
</div>


<div class="footer">
<div class="signature">
<a href="/">ZetCode</a> last modified December 2, 2010  <span class="copyright">&copy; 2007 - 2012 Jan Bodnar</span>
</div>
</div>

</div> <!-- content -->

</div> <!-- container -->

</body>
</html>
